package com.ruoyi.business.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品信息对象 goods_info
 *
 * @author wyb
 * @date 2025-07-11
 */
@Data
public class GoodsInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 在售商品ID
     */
    @Excel(name = "商品ID")
    @JsonProperty("goodsId")
    private Long goodsId;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称", width = 25)
    @JsonProperty("title")  // Jackson注解
    private String title;

    @Excel(name = "规格名称", width = 25)
    @JsonProperty("specValueName")
    private String specValueName;

    /**
     * 商品规格编码
     */
    @Excel(name = "规格编码", width = 25)
    @JsonProperty("outerSkuCode")
    private String skuCode;
    /**
     * 规格条码(主键)
     */
    @Excel(name = "规格条码")
    @JsonProperty("skuBarCode")
    private String skuBarCode;


    /**
     * 商品销售价格（元，保留两位小数）
     */
    @Excel(name = "商品销售价格")
    @JsonProperty("salePrice")
    private BigDecimal salePrice;

    /**
     * 商品数量
     */
    @Excel(name = "商品数量")
    private Long skuNum;

    /**
     * 商品规格 SKU 的 ID
     */
    @Excel(name = "SKUID")
    @JsonProperty("skuId")
    private Long skuId;

    /**
     * 类目ID
     */
    @Excel(name = "类目", dictType = "sys_goods_category")
    private Long categoryId;

    @Excel(name = "备注")
    private String remark;
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @Excel(name = "创建人")
    private String createBy;
    @Excel(name = "更新时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @Excel(name = "更新人")
    private String updateBy;
    @Transient
    private Integer rowNum;
    private Float status;
}
